﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

using Microsoft.Practices.Composite.Events;

namespace EQual.MainModule.Documents.Forms
{
    /// <summary>
    /// Interaction logic for FromsDetailsView.xaml
    /// </summary>
    public partial class FromsDetailsView : UserControl
    {
        public event EventHandler<DataEventArgs<object>> ItemSaved;

        public FromsDetailsView()
        {
            InitializeComponent();
        }

        public object ActiveItem
        {
            get { return DataContext; }
            set { DataContext = value; }
        }

        private void FileIconControl_OnExitingDocument(object sender, RoutedEventArgs e)
        {
            if (ItemSaved != null)
            {
                ItemSaved(this, new DataEventArgs<object>(ActiveItem));
            }
        }
    }
}
